package editorview.views;

import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.ui.IEditorReference;


public class FilePathProvider extends IEditorReferenceLabelProvider {

  @Override
  public void update(ViewerCell cell, IEditorReference editorReference) {
    String label = null;
    try {
      label = getPathEditorInput(editorReference).getPath().removeLastSegments(1).toOSString();
    } catch (Exception e) {
      label = editorReference.toString();
    }
    cell.setText(label);
  }


}
